package com.club.common.constant;

/**
 * @Author chaochao(vx : zhangfec)
 * @Date 2023/1/12 16:35
 * @Version 1.0
 */
public enum ClubTypeEnum {
    ONE("0", "服务类"),
    TWO("1", "康乐类"),
    THREE("2", "生命类"),
    FOUR("3", "体能类"),
    FIVE("4", "学艺类"),
    OHTER("5", "其它");

    private final String code;

    private final String value;

    ClubTypeEnum(String code, String value) {
        this.code = code;
        this.value = value;
    }

    public String getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }

    public static ClubTypeEnum matchKey(String key) {
        for (ClubTypeEnum value : values()) {
            if (value.code.equals(key)) {
                return value;
            }
        }
        return OHTER;
    }
}
